<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作业2</title>
</head>
<body>
<h1><pre>
class AuthClass:
    def __init__(self, name, pwd):
        self.name = name
        self.pwd = pwd

    def auth(self):
        if self.name == 'python' and self.pwd == '123':
            return True
        else:
            return False

user = AuthClass('python', '1223')

def outer(f):
    def inner(*args, **kwargs):
        if user.auth():
            return f(*args, **kwargs)
        else:
            return "用户或密码错误"

    return inner

@outer
def inform(str):
    return str

print(inform("登录成功"))
</pre></h1>
</body>
</html>